<?php 


/**
* 
*/
class Ren
{
	public $name;
	public $sex;

	function chi(){
		echo $this->name."很会吃"."<br />";
	}
	function sex(){
		if($this->sex == "男"){
			echo "你是男的"."<br />";
		}elseif ($this->sex == '女') {
			echo "你是女的"."<br />";
		}else{
			echo "你是人妖"."<br />";
		}
	}
}

$obj = new Ren();
$obj -> name = '我';
$obj -> chi();
$obj -> sex = 'dfsd';
$obj -> sex();

$obj1 = new Ren();
$obj1 -> sex = '男';
$obj1 -> sex();
 ?>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 <html lang="en">
 <head>
 	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
 	<title>Document</title>
 </head>
 <body>
 	
 </body>
 </html>